import request from '@/utils/request'

// 查询药品供应商生产商维护列表 (分页)
export function selectPageMaterialSupplier(query) {
    return request({
        url: '/material/materialSupplier/selectPage',
        method: 'get',
        params: query
    })
}

// 查询药品供应商生产商维护列表 (不分页)
export function listMaterialSupplier(query) {
    return request({
        url: '/material/materialSupplier/list',
        method: 'get',
        params: query
    })
}

// 查询药品供应商生产商维护详细
export function getMaterialSupplier(id) {
    return request({
        url: '/material/materialSupplier/' + id,
        method: 'get'
    })
}

// 新增药品供应商生产商维护
export function addMaterialSupplier(data) {
    return request({
        url: '/material/materialSupplier',
        method: 'post',
        data: data
    })
}

// 修改药品供应商生产商维护
export function updateMaterialSupplier(data) {
    return request({
        url: '/material/materialSupplier',
        method: 'put',
        data: data
    })
}

// 删除药品供应商生产商维护
export function delMaterialSupplier(id) {
    return request({
        url: '/material/materialSupplier/' + id,
        method: 'delete'
    })
}

/**
 * 刷新缓存
 * @param deptId
 * @returns {*}
 */
export function refreshCacheMaterialSupplier() {
    return request({
        url: '/material/materialSupplier/refreshCachematerialSupplier',
        method: 'get'
    })
}
